<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use frontend\modules\resource\logic\ResourceLogic;

/* @var $this yii\web\View */
/* @var $model common\models\HyAudio */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="hy-audio-form">

    <?php $form = ActiveForm::begin(); ?>

    <?= $form->field($model, 'res_code')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'res_title')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'res_othertitle')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'cat_id',['options' => ['class' => 'cat_id_input']])->dropDownList(ResourceLogic::classesMap(), ['prompt' => '选择分类']) ?>

    <?= $form->field($model, 'cat_id2',['options' => ['class' => 'cat_id2_input']])->dropDownList(ResourceLogic::classesMap($model->cat_id),['prompt' => '请选择分类']) ?>

    <?= $form->field($model, 'author')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'author_intro')->textarea(['rows' => 6]) ?>

    <?= $form->field($model, 'create_date')->textInput() ?>

    <?= $form->field($model, 'create_adress')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'cl_cat_id')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'keyword')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'summary')->textarea(['rows' => 6]) ?>

    <?= $form->field($model, 'length')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'album_title')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'album_engtitle')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'resource_id')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'url')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'cover_img')->textInput(['maxlength' => true]) ?>

    <div class="form-group">
        <?= Html::submitButton($model->isNewRecord ? '提 交' : '修 改', ['class' => $model->isNewRecord ? 'btn btn-success s-btn' : 'btn btn-primary s-btn']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
